<%@page import="Model.Bean.PhoneType"%>
<%@page import="Model.Util.PhoneTypeModel"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%//@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%//@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<fmt:setBundle var="b" basename="myapp" scope="session"/>
	<jsp:include page="frmAHeader.jsp"></jsp:include>
	
	<div>
		<h2>
			<fmt:message key="AAddPhone.Tittle" bundle="${ b }"/>
		</h2>
		<br/>
		<form action="AddPhoneAction" method="post">
		<table>
			<tr>
				<td>
					<fmt:message key="AAddPhone.PhoneName" bundle="${ b }"/>			
				</td>
				<td>
					<input type="text" name="PhoneName"/>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="AAddPhone.PhoneType" bundle="${ b }"/>			
				</td>
				<td>
					<select name="PhoneType">
						<%
							ArrayList<PhoneType> pts = new PhoneTypeModel().ShowAllType();
						
							for(PhoneType pt : pts) {
								%>
									 <option value="<%=pt.getTypeID() %>">
									 	<%=pt.getTypeName() %>
									 </option>
								<%
							}
						%>
					</select>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="AAddPhone.Description" bundle="${ b }"/>			
				</td>
				<td>
					<input type="text" name="Description"/>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="AAddPhone.Price" bundle="${ b }"/>			
				</td>
				<td>
					<input type="text" name="Price"/> VND
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="AAddPhone.Picture" bundle="${ b }"/>			
				</td>
				<td>
					<input type="text" name="Picture"/>
				</td>
			</tr>
		</table>
		<div>
			<input type="submit" value="<fmt:message key="AAddPhone.btAddPhone" bundle="${ b }"/>"/>
		</div>
		</form>
	</div>
	
	<jsp:include page="frmAFooter.jsp"></jsp:include>
</body>
</html>